<?php
/**
 * Single Forum
 *
 * @package bbPress
 * @subpackage Freshine
 * @since Freshine 1.1.0
 */
?>

<?php get_header(); ?>
	<div id="f9-mainbody" class="wrap">
		<div class="main clearfix">
			<?php get_sidebar( 'left' );?>
			<div id="f9-container" class="<?php f9_container_class() ?>">
            	<?php get_sidebar( 'content-top' );?>
				<div id="f9-content">

				<?php do_action( 'bbp_template_notices' ); ?>

				<?php while ( have_posts() ) : the_post(); ?>

					<?php if ( bbp_user_can_view_forum() ) : ?>

						<div id="forum-<?php bbp_forum_id(); ?>" class="bbp-forum-content">
							<h1 class="entry-title"><?php bbp_forum_title(); ?></h1>
							<div class="entry-content">

								<?php bbp_get_template_part( 'bbpress/content', 'single-forum' ); ?>

							</div>
						</div><!-- #forum-<?php bbp_forum_id(); ?> -->

					<?php else : // Forum exists, user no access ?>

						<?php bbp_get_template_part( 'bbpress/feedback', 'no-access' ); ?>

					<?php endif; ?>

				<?php endwhile; ?>

				</div><!-- #f9-content -->
				<?php get_sidebar( 'content-bottom' );?>
			</div><!-- #f9-container -->
            <?php get_sidebar( 'right' );?>
		</div>
	</div><!-- #f9-mainbody -->

<?php get_footer(); ?>
